package global

type ServerConfig struct {
	Service ServiceConfig           `mapstructure:"service" json:"service" yaml:"service"`
	UserSrv UserServiceConsulConfig `mapstructure:"userSrv" json:"userSrv" yaml:"userSrv"`
	//SaltMd5 SaltConfig              `mapstructure:"saltMd5" json:"saltMd5" yaml:"saltMd5"`
	Consul ConsulConfig `mapstructure:"consul" json:"consul" yaml:"consul"`
}
type ServiceConfig struct {
	Host    string `mapstructure:"host" json:"host" yaml:"host"`
	Port    int    `mapstructure:"port" json:"port" yaml:"port"` //api端口
	LogPath string `mapstructure:"logPath" json:"logPath" yaml:"logPath"`
}

type ConsulConfig struct {
	Host string   `mapstructure:"host" json:"host" yaml:"host"`
	Port int      `mapstructure:"port" json:"port" yaml:"port"`
	Name string   `mapstructure:"name" json:"name" yaml:"name"`
	Tag  []string `mapstructure:"tag" json:"tag" yaml:"tag"`
}

// rpc注册到consul的信息
type UserServiceConsulConfig struct {
	Host string `mapstructure:"host" json:"host" yaml:"host"`
	Port int    `mapstructure:"port" json:"port" yaml:"port"`
	Name string `mapstructure:"name" json:"name" yaml:"name"` //consul服务名
}

type NacosConfig struct {
	DataId string `mapstructure:"dataId" json:"dataId"`
	Host   string `mapstructure:"host" json:"host"`
	Port   uint64 `mapstructure:"port" json:"port"`
	Group  string `mapstructure:"group" json:"group"`
}

//
//type SaltConfig struct {
//	SaltLen    int `mapstructure:"saltLen" json:"saltLen" yaml:"saltLen"`
//	Iterations int `mapstructure:"iterations" json:"iterations" yaml:"iterations"`
//	KeyLen     int `mapstructure:"keyLen" json:"keyLen" yaml:"keyLen"`
//}
